<?php
class User extends Model {
	const ROLE_USER = 'user';
	const ROLE_ADMIN = 'admin';
	
	protected $_updatePK = false;
	
	public function getLendsByType($type)
	{
		return LendManager::getInstance()->getByEmailAndType($this->email, $type);
	}

	public function isAdmin()
	{
		return $this->rola == self::ROLE_ADMIN;
	}
	
	public function isUser()
	{
		return $this->rola == self::ROLE_USER;
	}
	
}